package com.fengshang.wedding.domain.model.api;

import java.util.Date;
/**
 * Message Value Object
 * 
 *@author gembin@gmail.com
 * 
 */
public class Message implements IMessage {

	private int id;
	
	private String title;

	private Date postDate;

	private String content;
	
	public Message(){
		
	}
	public Message(IMessage message) {
		if (message != null) {
			this.id = message.getId();
			this.title = message.getTitle();
			this.postDate = message.getPostDate();
			this.content = message.getContent();
		}

	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public Date getPostDate() {
		return postDate;
	}

	public void setPostDate(Date postDate) {
		this.postDate = postDate;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	} 
	
	public String toString() {
		return new StringBuffer()
		.append("{id=")
		.append(id).append("\n")
		.append("title=")
		.append(title).append("\n")
		.append("postDate=")
		.append(postDate).append("\n")
		.append("content=")
		.append(content).append("\n")
		.append("}")
		.toString();
	}
	

}
